package main

import (
	"time"
	"fmt"
)

type Employee struct {
	ID        int
	Name      string
	Address   string
	DoB       time.Time
	Position  string
	Salary    int
	ManagerID int
}


func main() {

	var dilbert Employee
	dilbert.Salary -= 5000

	position := &dilbert.Position
	*position = "Senior " + *position

	var employeeOfTheMonth *Employee = &dilbert
	employeeOfTheMonth.Position += " (proactive team player)"

	fmt.Println(dilbert, employeeOfTheMonth)

	p := Point{1, 2}
	q := Point{2, 1}
	fmt.Println(p.X == q.X && p.Y == q.Y) // "false"
	fmt.Println(p == q)

	type address struct {
		hostname string
		port     int
	}

	hits := make(map[address]int)
	hits[address{"golang.org", 443}]++

	var w Wheel
	w.X = 8            // equivalent to w.Circle.Point.X = 8
	w.Y = 8            // equivalent to w.Circle.Point.Y = 8
	w.Radius = 5       // equivalent to w.Circle.Radius = 5
	w.Spokes = 20

	fmt.Println(w)

	w = Wheel{Circle{Point{8, 8}, 5}, 20}

	fmt.Printf("%#v\n", w)
}

type Point struct {
	X, Y int
}

type Circle struct {
	Point
	Radius int
}

type Wheel struct {
	Circle
	Spokes int
}